Component({
  properties: {
    list: {
      type: null,
    },
    state: {
      type: null,
    },
    shopid: {
      type: null,
    },
  },
  data: {
    articles: [],
    iPnoneBottomBol:false
  }, // 私有数据，可用于模板渲染

  lifetimes: {
    // 生命周期函数，可以为函数，或一个在methods段中定义的方法名
    attached() {
      // console.log('listlist',this.data.list)
      let that = this;
      try {
        var value = wx.getStorageSync("iPhoneBottom");
        if (value) {
          that.setData({
            iPnoneBottomBol: true,
          });
          // Do something with return value
        }
      } catch (e) {
        // Do something when catch error
      }
    },
    moved() {},
    detached() {},
  },

  // 生命周期函数，可以为函数，或一个在methods段中定义的方法名
  attached() {}, // 此处attached的声明会被lifetimes字段中的声明覆盖
  ready() {},

  pageLifetimes: {
    // 组件所在页面的生命周期函数
    show() {},
    hide() {},
    resize() {},
  },

  methods: {
    gotourl_2(e) {
      try {
        wx.navigateTo({
          url: e.currentTarget.dataset.url,
        });
      } catch (err) {
        console.log(err);
      }
    },
    gotourl(e) {
      try {
        wx.navigateTo({
          url: e.currentTarget.dataset.url,
        });
      } catch (err) {
        console.log(err);
      }
    },
    gocatelist(e) {
      let id = e.currentTarget.dataset.id;
      wx.navigateTo({
        url: '/packageB/member/category/search_v2/search_v2?id='+id,
      });
      return false;
      // wx.navigateTo({
      //   url:
      //     "/packageB/member/category/catelist/catelist?id=" +
      //     id +
      //     "&fromHome=1",
      // });
    },
  },
});
